package com.mdd.admin.controller.order;

import com.mdd.admin.config.aop.Log;
import com.mdd.admin.service.order.IRechargeOrderService;
import com.mdd.admin.validate.order.RechargeOrderParam;
import com.mdd.admin.validate.common.PageParam;
import com.mdd.admin.vo.order.RechargeOrderListVo;
import com.mdd.admin.vo.order.RechargeOrderDetailVo;
import com.mdd.common.core.AjaxResult;
import com.mdd.common.core.PageResult;
import com.mdd.common.validator.annotation.IDMust;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.Map;

/**
 * 充值订单管理
 * @author panweiliang
 */
@RestController
@RequestMapping("api/order/recharge")
public class RechargeOrderController {

    @Resource
    IRechargeOrderService iRechargeOrderService;

    /**
     * 充值订单列表
     *
     * @author panweiliang
     * @param pageParam 分页参数
     * @param params 搜索参数
     * @return Object
     */
    @GetMapping("/list")
    public Object list(@Validated PageParam pageParam,
                       @RequestParam Map<String, String> params) {
        PageResult<RechargeOrderListVo> list = iRechargeOrderService.list(pageParam, params);
        return AjaxResult.success(list);
    }

}
